# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=iosforensic
pkgver=1.0
pkgrel=5
pkgdesc='iOS forensic tool.'
groups=('blackarch' 'blackarch-forensic' 'blackarch-mobile')
arch=('any')
url='https://github.com/Flo354/iOSForensic'
license=('custom')
depends=('python2' 'sshpass' 'sqlite3' 'python2-magic' 'libplist' 'openssh')
source=("https://github.com/Flo354/iOSForensic/archive/$pkgver.tar.gz")
sha512sums=('5034f5cdbd2f5facf45d67f769ade689ffa164eddb86eed7237955e2f2695f387a1af1da459dbc523b55a68d2ee62e30ab1fdb4e7ac388aee6977f724b2bad31')

package(){
  cd "iOSForensic-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 *.py "$pkgdir/usr/share/$pkgname/"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" changelog README.md

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python2 iOSForensic.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

